home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 12 / Cream of the Crop 12 (Part II) / Cream of the Crop 12 (Part II).iso / OS2 / VD08BIN.ZIP / usr / include / pm / window.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-13  |  2.5 KB  |  115 lines

  1. #ifndef _WINDOW_H_
  2. #define _WINDOW_H_
  3.  
  4. #ifndef _OS2_H
  5. #define INCL_PM
  6. #define INCL_SPLDOSPRINT
  7. #include <objc/os2.h>
  8. #include <objc/Object.h>
  9. #endif
  10.  
  11. #ifndef _ARCHIVING_H_
  12. #include <pm/Archiving.h>
  13. #endif
  14.  
  15. #define WINDOW_CLASS "ObjcWindow"
  16.  
  17. @interface Window : Object <Archiving>
  18. {
  19.   HWND    window;
  20.  
  21.   Window *child;
  22.   Window *sibling;
  23.   int     tag;
  24.  
  25.   SWP     windowSwp;
  26.   char   *windowText;
  27.   ULONG   pmId;
  28.   ULONG   windowFlags;
  29.  
  30.   char   *presParam_font;
  31. }
  32.  
  33. // initializers and destructors
  34. - init;
  35. - associate: (HWND) hwnd;
  36. - free;
  37.  
  38. - destroy;
  39.  
  40. // user defined integer data: tag
  41. - (int) tag;
  42. - setTag: (int) aTag;
  43.  
  44. // methods concerning window hierarchy
  45. - createObjects;
  46. - insertChild: aChild;
  47. - insertSibling: aSibling;
  48. - deleteChild: aChild;
  49. - deleteSibling: aSibling;
  50.  
  51. - findFromID: (ULONG) anId;
  52. - findFromHWND: (HWND) aHwnd;
  53.  
  54. - setChild: (Window *) aChild;
  55. - (Window *) child;
  56. - setSibling: (Window *) aSibling;
  57. - (Window *) sibling;
  58.  
  59. // methods for access to window words
  60. - (char *) text: (char *) buffer;
  61. - (int) textLength;
  62. - setText: (char *) buffer;
  63. - setSize: (LONG) x : (LONG) y : (LONG) w : (LONG) h;
  64. - setRect: (LONG) w : (LONG) h;
  65. - size: (PSWP) aSize;
  66. - (LONG) width;   // width of window
  67. - (LONG) height;  // height of window
  68. - (LONG) xoffset; // horizontal offset of lower left corner
  69. - (LONG) yoffset; // vertical offset of lower left corner
  70.  
  71. - (PFNWP) windowProcedure; // address of window procedure
  72. - (HMQ) messageQueue;      // handle of message queue
  73. - (ULONG) windowStyle;     // window Style flags
  74.  
  75. - setWindowStyle: (ULONG) styleFlags; // set window style flags
  76.  
  77. // methods for access to instance variables
  78. - (HWND) window;
  79. - setWindow: (HWND) aWindow;
  80. - (ULONG) pmId;
  81. - setPmId: (ULONG) anId;
  82.  
  83. - (BOOL) isVisible;
  84.  
  85. // methods for access to PM messages
  86. - enable;     // enable window
  87. - disable;    // disable window
  88. - activate;   // activate window
  89. - deactivate; // deactivate window
  90.  
  91. // methods for controlling display behaviour of windows
  92. - invalidate; // invalidate whole window rect
  93. - show;       // show window
  94. - hide;       // hide window
  95.  
  96. /*
  97.  * Methods for protocol "Archiving"
  98.  */
  99.  
  100. - awake;
  101. - read: (TypedStream *) aStream;
  102. - write: (TypedStream *) aStream;
  103.  
  104. - createInPMWindow: (HWND) hwnd;
  105.  
  106. // message loop
  107. - (MRESULT) handleMessage: (ULONG) msg
  108.             withParams: (MPARAM) mp1 and: (MPARAM) mp2;
  109.  
  110. @end
  111.  
  112. MRESULT EXPENTRY __windowFunction (HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2);
  113.  
  114. #endif
  115.